import redis
import sys


# redis


class RedisUtil:
    rs = any

    def __init__(self):
        try:
            # 清空库
            self.rs = redis.Redis(host="10.39.65.179", decode_responses=True)
        except:
            print("redis服务连接失败!")
            sys.exit(0)

    def setValue(self, keyword, value):
        self.rs.set(keyword, value)

    def getValue(self, keyword):
        self.rs.get(keyword)


redisClient = RedisUtil()

